/**
 * @file wa_image.c
 * 
 */

/*********************
 *      INCLUDES
 *********************/
#include "wa_image.h"
/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 *  STATIC PROTOTYPES
 **********************/

/**********************
 *  STATIC VARIABLES
 **********************/

/**********************
 *      MACROS
 **********************/

/**********************
 *   GLOBAL FUNCTIONS
 **********************/

/**
* get bitmap width
* @param bitmap 
*/
uint32_t wa_bitmap_get_width(wa_bitmap* bitmap)
{
	return bitmap->width;
}

/**
* get bitmap height
* @param bitmap
*/
uint32_t wa_bitmap_get_height(wa_bitmap* bitmap)
{
	return bitmap->height;
}

/**
* get bitmap data
* @param bitmap
*/
uint8_t* wa_bitmap_get_data(wa_bitmap* bitmap)
{
	if (bitmap->type == WA_BITMAP_TYPE_INSIDE)
	{
		return bitmap->data_p;
	}
	else if (bitmap->type == WA_BITMAP_TYPE_OUTSIDE)
	{
		if (bitmap->get_data_from_outside != NULL)
		{
			return bitmap->get_data_from_outside(bitmap);
		}
		return NULL;
	}
	return NULL;
}



/**********************
 *   STATIC FUNCTIONS
 **********************/
